
package bo;

import dto.DTO_KhachHang;
import java.sql.SQLException;
import java.util.ArrayList;
import mapper.MAP_KhachHang;

public class BUS_KhachHang {
     public boolean TrungTenDangNhap(String uname)
     {
         MAP_KhachHang mapKH = new MAP_KhachHang();
         return mapKH.TrungTenDangNhap(uname);
     }
     public boolean KiemTraDangNhap(String uname,String pass)
     {
         MAP_KhachHang mapKH = new MAP_KhachHang();
         return mapKH.KiemTraDangNhap(uname, pass);
     }
     public boolean ThemKH(DTO_KhachHang kh)
     {
         MAP_KhachHang mapKH = new MAP_KhachHang();
         return mapKH.ThemKH(kh);
     }
     public DTO_KhachHang LayThongTinKhachHang(String uname)
     {
         MAP_KhachHang mapKH = new MAP_KhachHang();
         return mapKH.LayThongTinKhachHang(uname);
     }
     public boolean CapNhatKH(DTO_KhachHang kh)
     {
         MAP_KhachHang mapKH = new MAP_KhachHang();
         return mapKH.CapNhatKH(kh);
     }
     public boolean DoiMatKhau(String TenDangNhap,String MatKhau)
     {
         MAP_KhachHang mapKH = new MAP_KhachHang();
         return mapKH.DoiMatKhau(TenDangNhap, MatKhau);
     }
     public boolean KiemTraEmail(String tendangnhap,String email)
     {
         MAP_KhachHang mapKH = new MAP_KhachHang();
         return mapKH.KiemTraEmail(tendangnhap, email);
     }
     public int LaQuanLy(String TenDangNhap) throws SQLException
    {
         MAP_KhachHang mapKH = new MAP_KhachHang();
         return mapKH.LaQuanLy(TenDangNhap);
     }
      public ArrayList<DTO_KhachHang> LayDanhSachKHTheoMaKH(int MaKH) throws SQLException
    {
        MAP_KhachHang mapKH = new MAP_KhachHang();
        return mapKH.LayDanhSachKHTheoMaKH(MaKH);
     }
     public ArrayList<DTO_KhachHang> LayDanhSachKHTheoTenKH(String TenKH)
    {
        MAP_KhachHang mapKH = new MAP_KhachHang();
        return mapKH.LayDanhSachKHTheoTenKH(TenKH);
    }
    public ArrayList<DTO_KhachHang> LayDanhSachKH()
    {
        MAP_KhachHang mapKH = new MAP_KhachHang();
        return mapKH.LayDanhSachKH();
    }
    public boolean XoaKhachHang(int MaKH)
    {
        MAP_KhachHang mapKH = new MAP_KhachHang();
        return mapKH.XoaKhachHang(MaKH);
    }
    public boolean CapNhatKHQL(DTO_KhachHang kh)
    {
         MAP_KhachHang mapKH = new MAP_KhachHang();
          return mapKH.CapNhatKHQL(kh);
    }
}
